﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CreditAgricole.Framework
{
    public static class Constants
    {

        #region Lists
        /// <summary>
        /// Nom de la liste des changements
        /// </summary>
        public const string ChangingListTitle = "mise en production";

        /// <summary>
        /// Nom de la liste historique du workflow
        /// </summary>
        public const string WorkflowHistoryList = "Workflow history";

        /// <summary>
        /// Nom de la liste des tâches pour les workflows
        /// </summary>
        public const string WorkflowTasksList = "Tasks";

        // Listes communes
        public const string KeywordsListTitle = "Mots Clé";
        public const string DomainsListTitle = "Domaines";
        public const string EntitiesListTitle = "Entités";
        public const string ProductsListTitle = "Produits";
        public const string DocTypesListTitle = "Types de Document";

        // Listes "Base de Connaissances"
        public const string KnowledgeApprovedListTitle = "Base de Connaissances";
        public const string KnowledgeUnapprovedListTitle = "Base de Connaissances - Nouveaux Documents";

        #endregion

        #region Views
        /// <summary>
        /// Nom de la vue "Calendrier" pour les demandes de mise en production approuvées
        /// </summary>
        public const string MEPCalendarViewName = "Calendrier des mises en production";
        #endregion

        #region Champ dans la liste Tasks

        /// <summary>
        /// Champ identifiant de la tache
        /// </summary>
        public const string IDField = "ID";

        /// <summary>
        /// Champ utilisateur assigné à la tâche
        /// </summary>
        public const string AssignedToField = "AssignedTo";

        /// <summary>
        /// Champ workflow
        /// </summary>
        public const string WorkflowField = "Workflow";

        /// <summary>
        /// Champ etat du workflow
        /// </summary>
        public const string WorkflowStatusType = "WorkflowStatus";

        /// <summary>
        /// Champ lien au workflow
        /// </summary>
        public const string WorkflowLinkField = "WorkflowLink";

        #endregion

        #region Champs de la liste mise en production

        /// <summary>
        /// Champs personnalisé Title
        /// </summary>
        public const string TitleField = "CATitle";

        /// <summary>
        /// Champ Name de la liste 
        /// </summary>
        public const string NameField = "Name";

        /// <summary>
        /// Champ date de création de l'element
        /// </summary>
        public const string CreatedDateField = "Created";

        /// <summary>
        /// Champ autuer de l'element
        /// </summary>
        public const string AuthorField = "Created By";

        /// <summary>
        /// Champ approbateur courant
        /// </summary>
        public const string MepStatusField = "CAMEPStatus";

        /// <summary>
        /// Champ approbateur 1
        /// </summary>
        public const string FirstApproverField = "CAApproverLvl1";

        /// <summary>
        /// Champ approbateur 2
        /// </summary>
        public const string SecondApproverField = "CAApproverLvl2";

        /// <summary>
        /// Nom du groupe d'utilisateurs pour approbation des documents (niveau 1)
        /// </summary>
        public const string MEPApproversLvl1GroupName = "Approbateurs Documents MEP Niveau 1";

        /// <summary>
        /// Description du groupe d'utilisateurs pour approbation des documents (niveau 1)
        /// </summary>
        public const string MEPApproversLvl1GroupDescription = "Groupe d'utilisateurs qui sont autorisés à approuver un document de mise en production (niveau 1)";

        /// <summary>
        /// Nom du groupe d'utilisateurs pour approbation des documents (niveau 2)
        /// </summary>
        public const string MEPApproversLvl2GroupName = "Approbateurs Documents MEP Niveau 2";

        /// <summary>
        /// Description du groupe d'utilisateurs pour approbation des documents (niveau 2)
        /// </summary>
        public const string MEPApproversLvl2GroupDescription = "Groupe d'utilisateurs qui sont autorisés à approuver un document de mise en production (niveau 2)";

        /// <summary>
        /// Champ entités
        /// </summary>
        public const string EntityField = "CAEntity";

        /// <summary>
        /// Champ domaines
        /// </summary>
        public const string DomainField = "CADomain";

        /// <summary>
        /// Champ Date souhaitée de mise en prod (due date)
        /// </summary>
        public const string DueDateField = "CADueDate";
        #endregion 

        public const string KnowledgeApproversLvl1GroupName = "Approbateurs Documents Base de Connaissance Niveau 1";
        public const string KnowledgeApproversLvl1GroupDescription = "Groupe d'utilisateurs qui sont autorisés à approuver un document de base de connaissance (niveau 1)";
        public const string KnowledgeApproversLvl2GroupName = "Approbateurs Documents Base de Connaissance Niveau 2";
        public const string KnowledgeApproversLvl2GroupDescription = "Groupe d'utilisateurs qui sont autorisés à approuver un document de base de connaissance (niveau 2)";

        #region AssociationData elements
        /// <summary>
        /// Assignment element in Association data xml
        /// </summary>
        public const string AssignmentElement = "Assignment";

        /// <summary>
        /// AssignmentType element in Association data xml
        /// </summary>
        public const string AssignmentTypeElement = "AssignmentType";

        /// <summary>
        /// Serial value to AssignmentType element
        /// </summary>
        public const string AssignmentTypeSerial = "Serial";

        /// <summary>
        /// Parallel value to AssignmentType element
        /// </summary>
        public const string AssignmentTypeParallel = "Parallel";

        /// <summary>
        /// Assignee element in Association data xml
        /// </summary>
        public const string AssigneeElement = "Assignee";

        /// <summary>
        /// Person element in Association data xml
        /// </summary>
        public const string PersonElement = "Person";

        /// <summary>
        /// DisplayName element in Association data xml
        /// </summary>
        public const string DisplayNameElement = "DisplayName";

        /// <summary>
        /// AccountId element in Association data xml
        /// </summary>
        public const string AccountIdElement = "AccountId";

        /// <summary>
        /// AccountType element in Association data xml
        /// </summary>
        public const string AccountTypeElement = "AccountType";

        /// <summary>
        /// User value to AccountTypeElement element in Association data xml
        /// </summary>
        public const string AccountTypeValueUser = "User";

        /// <summary>
        /// SharePointGroup value to AccountTypeElement element in Association data xml
        /// </summary>
        public const string AccountTypeValueSPGroup = "SharePointGroup";

        /// <summary>
        /// SecurityGroup value to AccountTypeElement element in Association data xml
        /// </summary>
        public const string AccountTypeValueSecurityGroup = "SecurityGroup";

        #endregion

        #region Proprietes des workflow
        /// <summary>
        /// Nom du template workflow approbation 
        /// </summary>
        public const string WorkflowTemplateName = "Approval - SharePoint 2010";

        /// <summary>
        /// Workflow Association Name
        /// </summary>
        public const string WorkflowAssociationName = "Approbation du document";

        #endregion

        #region Etats d'un workflow

        /// <summary>
        /// etat Failed on start
        /// </summary>
        public const string WorkflowStatusFailedOnStart = "Failed on start";
        
        /// <summary>
        /// etat In Progress
        /// </summary>
        public const string WorkflowStatusInProgress = "In Progress";
        
        /// <summary>
        /// etat Error Occurred
        /// </summary>
        public const string WorkflowStatusErrorOccured = "Error Occurred";
        
        /// <summary>
        /// etat Canceled
        /// </summary>
        public const string WorkflowStatusCanceled = "Canceled";
        
        /// <summary>
        /// etat Completed
        /// </summary>
        public const string WorkflowStatusCompleted = "Completed";
        
        /// <summary>
        /// etat Failed on Start (retrying)
        /// </summary>
        public const string WorkflowStatusFailedOnStartRetrying = "Failed on Start (retrying)";
        
        /// <summary>
        /// etat Error Occurred (retrying)
        /// </summary>
        public const string WorkflowStatusErrorOccuredRetrying = "Error Occurred (retrying)";
        
        /// <summary>
        /// etat Approved
        /// </summary>
        public const string WorkflowStatusApproved = "Approved";
        
        /// <summary>
        /// etat Rejected
        /// </summary>
        public const string WorkflowStatusRejected = "Rejected";

        #endregion
       
        #region Pages

        /// <summary>
        /// Nom du master page pour le site IT
        /// </summary>
        public const string MasterpagetName = "Site.master";

        /// <summary>
        /// Nom du layout de la page d'accueil
        /// </summary>
        public const string HomePageLayoutName = "PortailITHome.aspx";

        /// <summary>
        /// Nom du layout de la page des activités
        /// </summary>
        public const string ActivitiesPageLayoutName = "ITHome.aspx";

        /// <summary>
        /// Nom du layout de la page recherche
        /// </summary>
        public const string SearchPageLayoutName = "search.aspx";

        /// <summary>
        /// nom de la page d'accueil
        /// </summary>
        public const string HomePageName = "Home.aspx";

        /// <summary>
        /// Nom de la page des activités
        /// </summary>
        public const string ActivitiesPageName = "Activities.aspx";

        /// <summary>
        /// Nom de la page recherche
        /// </summary>
        public const string SearchPageName = "Search.aspx";

        #endregion
        
        #region Différents elements des menus

        /// <summary>
        /// Tous les menus qu'on a dans le site
        /// </summary>
        public enum ElementsSiteMenu
        {
            Home,
            Activities
        }

        /// <summary>
        /// Tous les menus pour les differentes vues sur la liste de MEP
        /// </summary>
        public enum ElementsMenu
        {
            TasksToBeValidatedTag= 1,
            MyCreatedTasksTag = 2,
            ValidatedTasksTag = 3,
            AllTasksTag = 4,
            AllCreatedTasksTag = 5
        }

        /// <summary>
        /// Differents critères pour chaque vue
        /// </summary>
        public enum ElementsMenuCritiria
        {
            FirstCritiria = 1,
            SecondCritiria = 2
        }

        #endregion

        public enum CamlQueryOperator
        {
            Equal,
            NotEqual,
            Or
        }

        #region Content type

        public const string ITBasePageContentType = "ITBasePageContentType";


        #endregion
    }
}
